package com.xyz.study.design_mode.b_adapter.objectadapter.mode;

/**
 * 角色: Adapter 适配器
 * @author XYZ
 * @version 1.0.0
 * @since 2021/1/15
 */
public class NewPrinterConcrete implements NewPrinter {

    private OldPrinter oldPrinter;

    public NewPrinterConcrete(OldPrinter oldPrinter){
        this.oldPrinter = oldPrinter;
    }
    @Override
    public void print() {
        System.out.println("新打印机 调用旧打印机打印接口");
        this.oldPrinter.print();
    }
}
